package com.serli.sample.data.runner.service;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.EntityManager;

import com.serli.sample.data.runner.domain.DataRecord;

public class DataRecordService extends AbstractService {

	public DataRecordService(EntityManager manager) {
		super(manager);
	}
	
	@SuppressWarnings("unchecked")
	public List<DataRecord> getAllOrderByDate() {
		List<DataRecord> result = new ArrayList<DataRecord>();
		result = manager.createNamedQuery(DataRecord.FIND_ALL_ORDER_BY_DATE).getResultList();
		return result;
	}

}
